﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp2
{
    class Program
    {
        static void Main(string[] args)
        {
            BM bm = new BM("宝马","X6" );
            bm.Run();
            Bianfuzhanche bianfuzhanche = new Bianfuzhanche("蝙蝠战车","蝙蝠战车一号");
            bianfuzhanche.Run();
            bianfuzhanche.Fly();

            Cat cat = new Cat();
            Dog dog = new Dog();
            Monkey monkey = new Monkey();
            Duck duck = new Duck();
            TestSwim(duck);
            TestClimb(cat);
            TestSwim(dog);
            TestClimb(dog);
            TestClimb(monkey);



            TestAnimal(cat);
            TestAnimal(duck);
            TestAnimal(monkey);
            TestAnimal(dog);


        }



        static void TestClimb(IClimb climb)
        {
            climb.Climb1();

        }
    static void TestSwim(ISwim swim)
    {
        swim.Swim1();

    }
    static void TestAnimal(Animal a)
    {
        a.Eat();

    }
}
}
